<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var str='git://www.baidu.com'
        
        var strs='.jpg'
        
        if(str.startsWith('http://')){
            alert('this is http')
        }else if(str.startsWith('https://')){
            alert('this is https')
        }else if(str.startsWith('git')){
            alert('this is git')
        }

        if(strs.endsWith('.jpg')){
            alert('this is jpg')
        }else if(strs.endsWith('.txt')){
            alert('this is .txt')
        }

        let ss=`this is heiheihei${strs}`;
        alert(ss)

        let html=`<h1>${str}<h1><h1>${str}<h1>
                        <h1>${str}<h1>`

        document.write(html)

        
    </script>
</body>
</html>